package group.sicher.common.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @Auth rock
 * @Date 2019/7/1 21:07
 * @description
 */
@Entity
@Table(name = "wm_ consumer_user")
public class ConsumerUserEntity {

    private Long id;
    private Long userId;
    private String nickName;
    private String headUrl;
    private String provice;
    private String proviceName;
    private String city;
    private String cityName;
    private String area;
    private String areaName;
    private Long createAt;
    private Long updateAt;

       @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "user_id", nullable = false)
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "nick_name", nullable = true, length = 60)
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @Basic
    @Column(name = "head_url", nullable = true, length = 255)
    public String getHeadUrl() {
        return headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
    }

    @Basic
    @Column(name = "provice", nullable = true, length = 20)
    public String getProvice() {
        return provice;
    }

    public void setProvice(String provice) {
        this.provice = provice;
    }

    @Basic
    @Column(name = "provice_name", nullable = true, length = 255)
    public String getProviceName() {
        return proviceName;
    }

    public void setProviceName(String proviceName) {
        this.proviceName = proviceName;
    }

    @Basic
    @Column(name = "city", nullable = true, length = 20)
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "city_name", nullable = true, length = 255)
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Basic
    @Column(name = "area", nullable = true, length = 20)
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "area_name", nullable = true, length = 255)
    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Basic
    @Column(name = "create_at", nullable = true)
    public Long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    @Basic
    @Column(name = "update_at", nullable = true)
    public Long getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Long updateAt) {
        this.updateAt = updateAt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ConsumerUserEntity that = (ConsumerUserEntity) o;
        return id == that.id &&
                userId == that.userId &&
                Objects.equals(nickName, that.nickName) &&
                Objects.equals(headUrl, that.headUrl) &&
                Objects.equals(provice, that.provice) &&
                Objects.equals(proviceName, that.proviceName) &&
                Objects.equals(city, that.city) &&
                Objects.equals(cityName, that.cityName) &&
                Objects.equals(area, that.area) &&
                Objects.equals(areaName, that.areaName) &&
                Objects.equals(createAt, that.createAt) &&
                Objects.equals(updateAt, that.updateAt);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userId, nickName, headUrl, provice, proviceName, city, cityName, area, areaName, createAt, updateAt);
    }
}
